home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 November / PCWorld_2006-11_cd.bin / domacnost a kancelar / opencontacts / ocusetup.exe / setup.exe / {code_GetDataFolder} / Templates / defaultAdvanced.xsl < prev    next >
Extensible Markup Language  |  2006-10-03  |  7KB  |  235 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  5. <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" />
  6.  
  7.   <xsl:template match="/">
  8.     <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  11. </head>
  12. <body>
  13.         <xsl:for-each select="OpenContacts/Contacts/Contact">
  14.  
  15.           <table border="0" width="100%" id="table2">
  16.             <tr>
  17.               <td width="80%">
  18.                 <font face="Times New Roman" size="3">
  19.                   <b>
  20.                     <xsl:value-of select="@Name"/>
  21.                   </b>
  22.                 </font>
  23.               </td>
  24.               <td>
  25.                 <xsl:value-of select="@Title"/>
  26.               </td>
  27.             </tr>
  28.           </table>
  29.           <div style="margin-left: 15px;">
  30.  
  31.             <font size="2" color="#800000">
  32.               <xsl:value-of select="Notes"/>
  33.             </font>
  34.  
  35.  
  36.           </div>
  37.           <table border="0" width="100%" id="tablecompanies" cellspacing="0" cellpadding="0">
  38.             <xsl:for-each select="Companies/Company">
  39.               <tr>
  40.                 <td width="15"></td>
  41.                 <td width="80" bgcolor="#E0D601">
  42.                   <font face="Times New Roman" size="2">Company: </font>
  43.                 </td>
  44.  
  45.                 <td bgcolor="#FFFCBF">
  46.                   <font size="3">
  47.  
  48.  
  49.                     <a href="idlink:{@ID}">
  50.                       <xsl:value-of select="@Name"/>
  51.                     </a>
  52.  
  53.  
  54.  
  55.                   </font>
  56.                 </td>
  57.               </tr>
  58.  
  59.             </xsl:for-each>
  60.           </table>
  61.  
  62.  
  63.           <table border="0" width="100%" id="tableLinkedContacts" cellspacing="0" cellpadding="0">
  64.             <xsl:for-each select="Contacts/Contact">
  65.               <tr>
  66.                 <td width="15"></td>
  67.                 <td width="80" bgcolor="#6CE26C">
  68.                   <font face="Times New Roman" size="2">Contact: </font>
  69.                 </td>
  70.  
  71.                 <td bgcolor="#C7F3C7">
  72.                   <font size="3">
  73.  
  74.  
  75.                     <a href="idlink:{@ID}">
  76.                       <xsl:value-of select="@Name"/>
  77.                     </a>
  78.  
  79.  
  80.  
  81.                   </font>
  82.                 </td>
  83.               </tr>
  84.  
  85.             </xsl:for-each>
  86.           </table>
  87.  
  88.  
  89.           <table border="0" width="100%" id="tablecategories" cellspacing="0" cellpadding="0">
  90.             <xsl:for-each select="Categories/Category">
  91.               <tr>
  92.                 <td width="15"></td>
  93.                 <td width="80" bgcolor="#CCFF33">
  94.                   <font face="Times New Roman" size="2">Category: </font>
  95.                 </td>
  96.  
  97.                 <td bgcolor="#E4FF95">
  98.                   <font size="3">
  99.  
  100.  
  101.                     <a href="calink:{@ID}">
  102.                       <xsl:value-of select="@Name"/>
  103.                     </a>
  104.  
  105.  
  106.  
  107.                   </font>
  108.                 </td>
  109.               </tr>
  110.  
  111.             </xsl:for-each>
  112.           </table>
  113.  
  114.           <xsl:for-each select="Sections/Section">
  115.             <div style="margin-left: 15px;">
  116.  
  117.  
  118.               <b>
  119.                 <font face="Times New Roman" size="2">
  120.                   <xsl:value-of select="@Name"/>
  121.                 </font>
  122.               </b>
  123.             </div>
  124.  
  125.  
  126.             <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
  127.               <xsl:for-each select="Fields/Field">
  128.                 <tr>
  129.                   <td width="15"></td>
  130.                   <td width="80" bgcolor="#C3D9FF">
  131.                     <font face="Times New Roman" size="2">
  132.                       <xsl:value-of select="@Name"/>:
  133.                     </font>
  134.                   </td>
  135.                   <td bgcolor="#E0ECFF">
  136.                     <font size="3">
  137.  
  138.                       <xsl:choose>
  139.  
  140.                         <xsl:when test="@Action='email'">
  141.  
  142.                           <a href="mailto:{@Value}">
  143.                             <xsl:value-of select="@Value"/>
  144.                           </a>
  145.                         </xsl:when>
  146.  
  147.                         <xsl:when test="@Action='web'">
  148.  
  149.                           <a href="web:{@Value}">
  150.                             <xsl:value-of select="@Value"/>
  151.                           </a>
  152.                         </xsl:when>
  153.  
  154.                         <xsl:when test="@Action='phone'">
  155.  
  156.                           <a href="phone:{@Value}">
  157.                             <xsl:value-of select="@Value"/>
  158.                           </a>
  159.                         </xsl:when>
  160.  
  161.  
  162.                         <xsl:when test="@Action='skype'">
  163.  
  164.                           <a href="skype:{@Value}">
  165.                             <xsl:value-of select="@Value"/>
  166.                           </a>
  167.                         </xsl:when>
  168.  
  169.                         <xsl:when test="@Action='file'">
  170.  
  171.                           <a href="local:{@Value}">
  172.                             <xsl:value-of select="@Value"/>
  173.                           </a>
  174.                         </xsl:when>
  175.  
  176.                         <xsl:when test="@Action='image'">
  177.  
  178.                           <a href="image:{@Value}">
  179.                             <xsl:value-of select="@Value"/>
  180.                           </a>
  181.                         </xsl:when>
  182.  
  183.                         <xsl:when test="@Action='person'">
  184.  
  185.                           <a href="person:{@Value}">
  186.                             <xsl:value-of select="@Value"/>
  187.                           </a>
  188.                         </xsl:when>
  189.  
  190.                         <xsl:when test="@Action='org'">
  191.  
  192.                           <a href="org:{@Value}">
  193.                             <xsl:value-of select="@Value"/>
  194.                           </a>
  195.                         </xsl:when>
  196.  
  197.                         <xsl:otherwise>
  198.                           <xsl:value-of select="@Value"/>
  199.  
  200.                         </xsl:otherwise>
  201.                       </xsl:choose>
  202.  
  203.  
  204.  
  205.                     </font>
  206.                   </td>
  207.                 </tr>
  208.               </xsl:for-each>
  209.  
  210.             </table>
  211.  
  212.             <div style="margin-left: 15px;">
  213.  
  214.               <font size="2" color="#800000">
  215.                 <xsl:value-of select="Notes"/>
  216.               </font>
  217.  
  218.  
  219.             </div>
  220.  
  221.           </xsl:for-each>
  222.  
  223.           <p>  </p>
  224.  
  225.         </xsl:for-each>
  226.  
  227.  
  228.  
  229.  
  230.  
  231.       </body>
  232.     </html>
  233.   </xsl:template>
  234.  
  235. </xsl:stylesheet>